-
Notifications
You must be signed in to change notification settings - Fork 18
Migrating the whole project from xcontext to go-belt. #164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## develop #164 +/- ##
===========================================
- Coverage 63.37% 61.79% -1.58%
===========================================
Files 165 130 -35
Lines 10587 9196 -1391
===========================================
- Hits 6709 5683 -1026
+ Misses 3134 2842 -292
+ Partials 744 671 -73
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
|
this is gonna take a while to review, but i know what it is about |
|
I've switched the base from |
mimir-d
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only reviewed first commit so far
mimir-d
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2nd commit reviewed; some styling changes and docs requested
|
since this touches state resume in a lot of places, id like to see a test with that. maybe a step with sleep 30, sigint the server and resume that would also show if there's any changes in the log output |
mimir-d
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewed last 2 commits; looks ok
|
I've started to redesign Will publish today-tomorrow. UPDATE: Done. But now integration tests are failing. Looking into it... |
88b0926 to
85160d7
Compare
I thought we have integration tests, which check this. No? |
f8e09cd to
7a0af56
Compare
|
Commit "[pkg/signaling] Add a package to handle Pause signal" was rewritten from scratch and requires a full review. In other commits the changes are isolated to minimalistically address the provided feedback. |
mimir-d
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some changes requested for first commit; specifically that panic bit
|
very nice job in refactoring the signaling part |
e00525a to
1e6e688
Compare
yeah, that's fair. we'll also see if it breaks on internal usage |
8c4d52c to
0311308
Compare
92d416a to
c13b022
Compare
A minimal implementation of a handler to keep the context API for Pause. Signed-off-by: Dmitrii Okunev <[email protected]>
Signed-off-by: Dmitrii Okunev <[email protected]>
Signed-off-by: Dmitrii Okunev <[email protected]>
Signed-off-by: Dmitrii Okunev <[email protected]>
Signed-off-by: Dmitrii Okunev <[email protected]>
|
Pushed a new version of the PR. Overall:
|
|
thanks for addressing all of the review items; merging |
What
Here I do substitution of
xcontexttogo-beltandsignallers. The APIs are mostly compatible, so this was a pretty mechanistic stupid job (could mostly be done withsed).Caveats:
xcontextbinds together three different things: observability API, context and signals (currently used to propagatePausesignal across the application). And it is problematic to make the migration of observability API and signals separately, because if I migrate one thing, it breaks another thing. So I migrate them together in one commit.xcontextbothCancelandPauseas processed by the same handler. But after migrationCancelis processed by standardcontextAPI, whilePauseis processed by additional signal-handler. Because of that it is now no unified API between these two.Why
TLDR:
xcontextis succeeded bygo-belt.xcontextexisted for some time, there was gathered the feedback and in resultgo-beltis a better version of similar ideas.More details
The previous design had few very serious problems:
Caveatsabove) and is not scalable horizontally (the amount of observability tools are limited).context.Context, which causes different inconveniences with necessity to type-cast and do other similar stuff. Also the custom context type started to propagate to public APIs which never was the intention (public APIs should always use only the standard context).xcontextis on life-support, whilego-beltis actually supported.There were also other known (less serious) problems, and in
go-beltall that is solved.How
The PR consists of 4 commits:
Pause(though it can propagate other signals as well). This package mostly just replicates the related code ofxcontext.xcontexttogo-beltandsignalleraccordingly. This is mostly mechanistic change, which stupidly changes the code to an equivalent. Sorry for a huge commit, but it is difficult to split without breaking functionality :(xcontextis deleted (packageperfis kept and moved out ofxcontext).